﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CustomerToRubbish.aspx.cs"
    Inherits="ZX.WebApp.Crm.Customer.CustomerToRubbish" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/yahoo-dom-event/yahoo-dom-event.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/element/element-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datasource/datasource-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/json/json-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/connection/connection-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/get/get-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/dragdrop/dragdrop-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/datatable/datatable-min.js"></script>
    <script type="text/javascript" src="../../Scripts/yui_2.9.0/build/paginator/paginator-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/layout/layout-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/button/button-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/container/container-min.js"></script>
    <script type="text/javascript" src="../../scripts/yui_2.9.0/build/event-delegate/event-delegate-min.js"></script>
    <script src="../../Scripts/jquery-1.6.min.js" type="text/javascript"></script>
    <script src="../../Scripts/Public.js" type="text/javascript"></script>
    <script src="../../Scripts/extend.validate.js" type="text/javascript"></script>
    <script src="../../Scripts/smartFocus.js" type="text/javascript"></script>
    <link href="../../Styles/extendTable.css" rel="stylesheet" type="text/css" />
</head>
<body>
    <form id="form1" runat="server">
    <div>
        <textarea id="Explain" onkeydown="showSetNum('Explain','ShowExplain',300)" onkeyup="showSetNum('Explain','ShowExplain',300)"
            onblur="showSetNull('ShowExplain')" style="width: 97%; height: 240px;"></textarea><br />
        <span class="span_font" id="ShowExplain"></span>
    </div>
    </form>
</body>
<script type="text/javascript">
    var defaultValue="请输入废弃原因...";
    $(document).ready(function () {
        $("#Explain").smartFocus({ defaultText: defaultValue });
    });
    function Save() {
        var vExplain = $("#Explain").val();
        if (vExplain == "" || vExplain == defaultValue) {
            parent._state = 0;
            InputError("Explain", 3);
        } else {
            if (confirm("是否确定废弃该客户?")) {
                SaveData(vExplain);
            }
        }
    }
    var SaveData = function (vExplain) {
        var Url = "../../Extend/AjaxData/CustomOperating.aspx?r=" + Math.random() + "&action=update&entity=CrmCustomerOldd&json=&ids=" + getPar1("id") + "&explain=" + encodeURI(vExplain);
        YAHOO.util.Connect.asyncRequest('POST', Url, {
            success: function (res) {
                try {
                    var str = res.responseText;
                    if (str == "1") {
                        alert("操作成功!");
                        parent.closeWin();
                        //parent.ReLoadData();
                    }
                    else {
                        alert(str);
                    }
                }
                catch (e) {
                }
                finally {
                }
            },
            failure: function (error) {
                alert("数据错误：" + error.statusText);
            }
        }, null);
    }
</script>
</html>
